package com.wind.plugin.common;


public enum OracleFunsEnum {
    NVL("nvl"),
    TO_DATE("to_date"),
    SUM("sum"),
    SYSDATE("sysdate"),
    AVG("avg"),
    TO_CHAR("to_char"),
    TRUNC("trunc"),
    DECODE("decode"),
    WM_CONCAT("wm_concat"),
    ADD_MONTH("add_month"),
    LENGTH("length"),
    TRIM("trim"),
    LTRIM("ltrim"),
    RTRIM("rtrim"),
    NOW("now"),
    CEIL("ceil"),
    EXTRACT("extract"),
    TO_NUMBER("to_number"),
    INITCAP("initcap"),
    TRANSLATE("translate"),
    REGEXP_LIKE("regexp_like"),
    REGEXP_INSTR("regexp_instr"),
    REGEXP_SUBSTR("regexp_substr"),
    INSTR("instr"),
    LISTAGG("listagg"),
    NV12("nv12"),
    TO_DSINTERVAL("to_dsinterval"),
    COUNT("count");

    private String funName;

    OracleFunsEnum(String funName) {
        this.funName = funName;
    }

    public String getFunName(){
        return funName;
    }

    public static boolean isOracleFun(String funName) {
        for (OracleFunsEnum value : OracleFunsEnum.values()) {
            if (value.getFunName().equalsIgnoreCase(funName)) {
                return true;
            }
        }
        return false;
    }


}